{
  "description": "Error tracking event payload",
  "type": "object",
  "required": ["exception"],
  "properties": {
    "environment": {
      "type": "string"
    },
    "platform": {
      "type": "string"
    },
    "sdk": {
      "type": "object"
    },
    "exception": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/exception"
          }
        },
        {
          "type": "object",
          "required": ["values"],
          "properties": {
            "values": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/exception"
              }
            }
          }
        }
      ]
    }
  },
  "definitions": {
    "exception": {
      "type": "object",
      "required": [],
      "properties": {
        "type": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "stacktrace": {
          "type": "object",
          "required": [],
          "properties": {
            "frames": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [],
                "properties": {
                  "abs_path": {
                    "type": "string"
                  },
                  "function": {
                    "type": "string"
                  },
                  "lineno": {
                    "type": "number"
                  },
                  "in_app": {
                    "type": "boolean"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "pre_context": {
                    "type": "array"
                  },
                  "context_line": {
                    "type": ["string", "null"]
                  },
                  "post_context": {
                    "type": "array"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
